﻿using System;

using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Globalization;

namespace PFD
{
    internal class Helper
    {
        internal static float ReadFloatFromXmlNodeInnerText(XmlNode nd)
        {
            string floatstring = nd.InnerText;
            CultureInfo culture = new CultureInfo("en-US");

            float fRet = (float)Convert.ToDouble(floatstring, culture);

            return fRet;
        }

        internal static float ReadFloatFromXmlNodeAttribute(XmlAttribute at)
        {
            string floatstring = at.Value;
            CultureInfo culture = new CultureInfo("en-US");

            float fRet = (float)Convert.ToDouble(floatstring, culture);

            return fRet;
        }
    }
}
